<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<div id="main-content">	
			<div class="container">
				  <div class="row">
<div class="col-md-13">
	
		<div class="container">
					<div class="row">
						<div class="col-md-6 col-md-offset-3">
							<div class="login-box-plain">
								<h2 class="bigintro">注册帐户</h2>
								<!-- <div class="divide-40"></div> -->
								<form role="form" method="post" action="loginInsert" >
								
								  <div class="form-group">
									<label for="exampleInputUsername">用户名</label>
									<i class="fa fa-user"></i>
									<input type="text" class="form-control" name="username" />
								  </div>
							      
								  <div class="form-group"> 
									<label for="password">密码</label>
									<i class="fa fa-lock"></i>
									<input type="password" class="form-control" id="pwd1" name="password" required="true" />
								  </div>
			
								  <div class="form-group"> 
									<label for="password_again">再输入一次密码</label>
									<i class="fa fa-check-square-o"></i>
									<input type="password" onkeyup="validate()" class="form-control"  name="password_again" required="true"  id="pwd2"/>
								    <span id="tishi"></span>
								  </div>
								
								  <div class="form-actions">
									<button type="submit"  id="submit" class="btn btn-success" >注册</button>
								  </div>
								  
								</form>
								
							</div>
						</div>
					</div>
				</div>
					</div>
					  </div>
					</div>
				</div>
	<!--判断两次密码是否想相同！  -->
			<script type="text/javascript">
                      function validate(){
                         var pwd1 = document.getElementById("pwd1").value;
                         var pwd2 = document.getElementById("pwd2").value;
                         if(pwd1 == pwd2){
                           document.getElementById("tishi").innerHTML="<font color='green'>两次密码相同</font>";
                          
                           document.getElementById("submit").disabled = false;
                         }else{
                           document.getElementById("tishi").innerHTML="<font color='red'>两次密码不相同</font>";
                           document.getElementById("submit").disabled = true;
                         }
                         
                      }
            </script>
	